//暴力求解数组中只出现一次的数字
var singleNumber = function(nums) {
    let len = nums.length;
        nums = nums.sort((x, y) => x - y);
        
        
        if (nums[0] != nums[1]) return nums[0];
        if (nums[len - 1] != nums[len - 2]) return nums[len - 1];
        for (let i = 2; i < len - 2; i += 2) {
            if (nums[i] != nums[i - 1] && nums[i] != nums[i + 1]) return nums[i];}
        }
   